<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>导航栏第4遍</title>
    <style>
        *{
            padding: 0px;
            margin: 0px;
        }
        a{
            text-decoration: none;
        }
        ul{
            list-style: none;
        }
        .box{
            width: 960px;
            height: 30px;
            background:#FF8F00;
            margin: 0 auto;
        }
        .box1>li{
           display: inline-block;
            height: 30px;
            line-height:30px;
            float: left;
            padding: 0 12px;
        }
        .box2>li{
            height: 30px;
            line-height: 30px;
            display: none;
            background: yellow;
        }
        .box1>li:hover>ul>li{
            display: block;
        }
        .box21>li{
            position: relative;
            left:35px;
            top: -30px;
            display: none;
        }
        .box2>li:hover>ul>li{
            display: block;
        }
        .box1>li:hover>a{
            color: red;
            text-decoration:underline;
        }
        .box>ul>li>a{
            color: white;
        }
        .box2>li>a{
            color: black;
        }
        .box2>li:hover>a{
            color: red;
            text-decoration: underline;
        }
        .box2>li:hover{
            background: pink;
        }
    </style>
</head>
<body>
<div class="box">
    <ul class="box1">
        <li class="active">
            <a href="#">主体市场</a>
            <ul class="box2">
                <li>
                    <a href="#">男装</a>
                    <ul class="box21">
                        <li>外套</li>
                        <li>裤子</li>
                        <li>上衣</li>
                    </ul>
                </li>
                <li><a href="#">女装</a></li>
                <li><a href="#">配件</a></li>
            </ul>
        </li>
        <li>
            <a href="#">天猫</a>
            <ul class="box2">
                <li>
                    <a href="#">男装</a>

                </li>
                <li><a href="#">女装</a></li>
                <li><a href="#">配件</a></li>
            </ul>
        </li>
        <li><a href="#">聚划算</a></li>
        <li><a href="#">天猫超市</a></li>
        <li><a href="#">淘抢购</a></li>
        <li><a href="#">电器城</a></li>
        <li><a href="#">淘宝心选</a></li>
        <li><a href="#">兴农脱贫</a></li>
        <li><a href="#">飞猪旅行</a></li>
        <li><a href="#">智能生活</a></li>
        <li><a href="#">苏宁易购</a></li>
    </ul>
</div>
</body>
</html>